import React from 'react';
import './main.scss';
import Footer from 'views/footer/footer';

class Main extends React.Component {
	render() {
		let routes = [];
		this.props.routes.forEach(item => {
			if (item.path) {
				let path = item.path.replace('/', '');
				routes.push(path);
			}
		});
		routes = routes.join('/');
		return <div id="main" className="flex-col">
			<div className="flex-g-1 scroll-absolute">{this.props.children}</div>
			<Footer routes={routes} />
		</div>;
	}
}
export default Main;
